package celiasoft.itasalib.query;

import celiasoft.itasalib.filegatherer.XMLGatherer;
import celiasoft.itasalib.query.resultparser.IQueryResultParser;
import celiasoft.itasalib.query.resultparser.QueryAllShowResultParser;
import celiasoft.itasalib.staticdata.ItasaStaticUrls;

public class SearchShowQuery extends Query {

	private int _page = 1;
	private String _query;

	public SearchShowQuery(XMLGatherer gatherer, String apikey) {
		super(gatherer, apikey);
	}

	@Override
	protected String getQueryUrl() {
		return String.format(ItasaStaticUrls.SHOWS_SEARCH_URL, getAPIKey(), this._query, this._page);
	}

	public int getPage(){
		return this._page;
	}
	
	public void setPage(int page){
		this._page = page;
	}
	
	public String getQuerySearch(){
		return this._query.toString();
	}
	
	public void setQuerySearch(String query){
		this._query = query;
	}
	
	@Override
	protected IQueryResultParser getResultParser() {
		return new QueryAllShowResultParser();
	}

	
}
